package com.fh.controller;

import com.fh.model.OrderItem;
import com.fh.service.OrderitemService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("item")
public class OrderitemController {

@Resource
    private OrderitemService orderitemService;



@PostMapping("add")
 public  int addOrderitem(@RequestBody OrderItem orderItem){
    return  orderitemService.addOrderitem(orderItem);
}



}
